home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / Small Demos / twice.icl < prev    next >
Encoding:
Text File  |  1997-06-20  |  230 b   |  17 lines  |  [TEXT/3PRM]

  1. module twice
  2.  
  3. /*
  4. The Twice function.
  5.  
  6. An integer (0) is incremented 65536 times using the higher
  7. order function Twice.
  8. */
  9.  
  10. import StdClass, StdInt
  11.  
  12. Twice::(x -> x) x -> x
  13. Twice f x =  f (f x)
  14.  
  15. Start::Int
  16. Start = Twice Twice inc 0
  17.